Set Environment Variables - TomEE

For Windows deployment we need to create setenv.bat file in the bin folder of extracted TomEE directory.

For Linux deployment we need to create setenv.sh file in the bin folder of extracted TomEE directory.

The following configuration needs to be placed in the setenv.bat file for Windows environment.

Some Highlights before arguments changes

  1. You can configure the cache name in the setenv.sh file for both the Cycle Server and Cycle Client by adding -Dexecutor.name=xxx to the CATALINA_OPTS. If not specified, the default cache name is Single-Cache.

  2. Ensure you specify -Dtangosol.coherence.mode=prod in both cycle server and client in setenv.sh to enable coherence run in Production mode.

Classpath Arguments

set CATALINA_OPTS=-Xms128m -Xmx1024m -XX:+UseG1GC

-Dtangosol.coherence.cacheconfig="C:/<Server Path>/shared/conf/cycle-coherence-cache-config.xml"

-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml

-Dtangosol.coherence.override="C:/<Server Path>/shared/conf/cycle-coherence-config.xml"

-Dtangosol.coherence.distributed.localstorage=true

-Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

-Dtangosol.coherence.mode=prod

-Djava.util.logging.config.file="C:/<Server Path>/shared/conf/logging.properties"

-Dserver.name="<Name of the server>"

set OIPA_KEYSTORE_PWD=changeit

 

For Linux Env in setenv.sh

Linux class path

export CATALINA_OPTS="-Xms128m -Xmx1024m -XX:+UseG1GC

-Dtangosol.coherence.cacheconfig=/Servers/TomEE/shared/conf/cycle-coherence-cache-config.xml

-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml

-Dtangosol.coherence.override=/Servers/TomEE/shared/conf/cycle-coherence-config.xml

-Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.mode=prod

-Djava.util.logging.config.file=/Servers/TomEE/shared/conf/logging.properties

-Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

-Dserver.name=<Name of the server>"

export OIPA_KEYSTORE_PWD="changeit"

Note: To enable remote debugging

Debug

-agentlib:jdwp=transport=dt_socket,address=1044,server=y,suspend=n

Note: To enable JMX events to Admin console application

Add to existing path

-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.authenticate=false

-Dcom.sun.management.jmxremote.autodiscovery=true

-Dcom.sun.management.jmxremote.port=<Unique Port Number>

If servers JMX port is not getting exposed to jconsole or adminconsole use below argument as well in that server arguments. The IP address should be server actual IP address.

RMI Port
-Djava.rmi.server.hostname=ipaddress